FUNCTION
pubkey_to_xy
function pubkey_to_xy(pubkey: byte_array): (big_integer, big_integer)Extract the x and y coordinates from an EC point public key. The extracted point is a tuple
containing two big_integers, which are the x and y coordinates of the given public key, a
point on the secp256k1 elliptic curve.
Inverse of crypto.xy_to_pubkey().
Accepts valid 33, 64 or 65 byte public keys. Note that not all byte arrays of acceptable
length constitute valid public keys.
Parameters
- pubkey — the public key
Returns
the EC point x and y coordinates of the given public key
Throws
exception— when - the given byte array does not have length33,64or65- the given byte array is not a valid public key
Since
0.13.5
© 2026 Chromia